#! /bin/bash
HOST=$1
USER=$2
PASS=$3
HOUR=$4
echo "$HOST,$USER,$PASS,$HOUR"
lftp -u $USER,$PASS sftp://$HOST<<END_SFTP
lcd /alidata1/shell/logger/pv
cd /usr/local/logs/pv
mget pv.log.`date +%Y-%m-%d-%H --date='1 hours ago'`
lcd /alidata1/shell/logger/request
cd /usr/local/logs/request
mget request.log.`date +%Y-%m-%d-%H --date='1 hours ago'`
lcd /alidata1/shell/logger/show
cd /usr/local/logs/show
mget show.log.`date +%Y-%m-%d-%H --date='1 hours ago'`
lcd /alidata1/shell/logger/click
cd /usr/local/logs/click
mget click.log.`date +%Y-%m-%d-%H --date='1 hours ago'`
lcd /alidata1/shell/logger/activate
cd /usr/local/logs/activate
mget activate.log.`date +%Y-%m-%d-%H --date='1 hours ago'`
echo "sftp done...."
bye
